<?php
class Pageley_Controller_ModelAndView {
	private $model;
	private $view;
    private $afterViewAction;
	
	public function __construct($model = null, $view = null) {
		$this->model = $model;
		$this->view = $view;
	}
	
	public function getModel() {
		return $this->model;
	}
	
	public function getView() {
		return $this->view;
	}
    
    public function setAfterViewAction($afterViewAction) {
        $this->afterViewAction = $afterViewAction;
    }
    
    public function doAfterViewAction() {
        if($this->afterViewAction !== null) {
            $this->afterViewAction->execute();
        }
    }
    
    public function setView($view) {
    	$this->view = $view;
    }

}